home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10903 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: river.tay.ac.uk!insc3npt
  2. From: insc3npt@river.tay.ac.uk (N Thomson)
  3. Newsgroups: comp.lang.c
  4. Subject: [Q] curses wgetch returns incorrent value.
  5. Message-ID: <1996Mar20.194836.145@river.tay.ac.uk>
  6. Date: 20 Mar 96 19:48:36 GMT
  7. Reply-To: N.THOMSON@BCS.ORG.UK
  8. Organization: University of Abertay Dundee
  9.  
  10. I am using DEC C on a DEC Alpha AXP running OpenVMS.
  11.  
  12. I am writting a program which uses curses to control screen output and I am 
  13. having a bit of a problem with it.
  14.  
  15. According to some code I have seen the wgetch(window) function (where window is 
  16. a pointer to a window) should read in a character and echo it to the specified 
  17. window.  Also if I use the crmode() function it is not necessary to press 
  18. return.
  19.  
  20. However when I do this I always get the same code for the input no matter what 
  21. the character is.
  22.  
  23. The code looks something like this:
  24.  
  25. .
  26. .
  27. .
  28. win1=newwin(1,80,23,0) ;
  29. .
  30. .
  31. while(1) {
  32.     c=wgetch(win1) ;
  33.     switch(c) {
  34.     .
  35.     .
  36.     .
  37.     }
  38. .
  39. .
  40.  
  41. Can anyone help me out here.  It is very urgent.
  42.  
  43. Thanx
  44.  
  45. Nick.
  46. --
  47. N.Thomson@bcs.org.uk                       insc3npt@river.tay.ac.uk
  48.